package com.itheima.mapper;

import com.itheima.domain.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentMapper {

    //查询全部
    public abstract List<Student> findAll();

    //根据id查询
    public abstract Student findById(Integer id);

    //新增数据
    public abstract Integer save(Student stu);

    //修改数据
    public abstract Integer update(Student stu);

    //删除数据
    public abstract Integer delete(Integer id);

    //模糊查询
    public abstract List<Student> findByName(String name);


    public abstract List<Student> findByNameOrAge(@Param("name") String name, @Param("age") Integer age);
    List<Student> findStus( Student student);
    List<Student> findIds(List<Integer> ids);

}
